package cn.com.greatwall.system.modules.oauth2.oauth;

import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter;
import org.springframework.security.oauth2.provider.token.DefaultUserAuthenticationConverter;

import cn.com.greatwall.system.modules.security.service.UserDetailsServiceImpl;

/**
 * @Author herw
 * @Time 2020-10-28 12:58:14
 * @Version 1.0
 * @Description: TODO(用一句话描述该文件做什么)
 */
public class OauthAccessTokenConverter extends DefaultAccessTokenConverter {
    public OauthAccessTokenConverter(UserDetailsService userService) {
        DefaultUserAuthenticationConverter converter = new DefaultUserAuthenticationConverter();
        converter.setUserDetailsService(userService);
        super.setUserTokenConverter(converter);
      }
}
